500 |
How can I add an extra button to a spin editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") oGrid:DefaultItemHeight := 20 oEditor := oGrid:Columns():Add("Date"):Editor() oEditor:EditType := 4/*SpinType*/ oEditor:AddButton("B1",2,1,"This is a bit of text that's shown when the cursor hovers the button B1") oEditor:ButtonWidth := 20 oItems := oGrid:Items() oItems:AddItem(0) oItems:AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
499 |
How can I remove or delete the buttons in the editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") oEditor := oGrid:Columns():Add("Edit"):Editor() oEditor:EditType := 1/*EditType*/ oEditor:AddButton("B1",1,0,"This is a bit of text that's shown when the cursor hovers the button B1") oEditor:AddButton("B3",2,1,"This is a bit of text that's shown when the cursor hovers the button B3") oEditor:AddButton("B4",1,1,"This is a bit of text that's shown when the cursor hovers the button B4") oEditor:RemoveButton("B1") oEditor:ButtonWidth := 20 oItems := oGrid:Items() oItems:AddItem("Text 1") oItems:AddItem("Text 2") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
498 |
How can I hide the buttons in the editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") oGrid:DefaultItemHeight := 24 oEditor := oGrid:Columns():Add("Edit"):Editor() oEditor:EditType := 1/*EditType*/ oEditor:AddButton("B1",1,0,"This is a bit of text that's shown when the cursor hovers the button B1") oEditor:AddButton("B3",2,1,"This is a bit of text that's shown when the cursor hovers the button B3") oEditor:AddButton("B4",1,1,"This is a bit of text that's shown when the cursor hovers the button B4") oEditor:ButtonWidth := 0 oItems := oGrid:Items() oItems:AddItem("Text 1") oItems:AddItem("Text 2") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
497 |
How can I change the width of the buttons in the editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") oGrid:DefaultItemHeight := 24 oEditor := oGrid:Columns():Add("Edit"):Editor() oEditor:EditType := 1/*EditType*/ oEditor:AddButton("B1",1,0,"This is a bit of text that's shown when the cursor hovers the button B1") oEditor:AddButton("B3",2,1,"This is a bit of text that's shown when the cursor hovers the button B3") oEditor:AddButton("B4",1,1,"This is a bit of text that's shown when the cursor hovers the button B4") oEditor:ButtonWidth := 24 oItems := oGrid:Items() oItems:AddItem("Text 1") oItems:AddItem("Text 2") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
496 |
How can I add extra buttons to an editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") oEditor := oGrid:Columns():Add("Edit"):Editor() oEditor:EditType := 1/*EditType*/ oEditor:AddButton("B1",1,0,"This is a bit of text that's shown when the cursor hovers the button B1") oEditor:AddButton("B2",2,0,"This is a bit of text that's shown when the cursor hovers the button B2") oEditor:AddButton("B3",3,1,"This is a bit of text that's shown when the cursor hovers the button B3") oEditor:AddButton("B4",1,1,"This is a bit of text that's shown when the cursor hovers the button B4") oItems := oGrid:Items() oItems:AddItem("Text 1") oItems:AddItem("Text 2") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
495 |
is there any function to specify the number of rows / items being visible in a drop down list editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oEditor := oGrid:Columns():Add("DropDown"):Editor() oEditor:EditType := 3/*DropDownListType*/ oEditor:AddItem(1,"First item") oEditor:AddItem(2,"Second item") oEditor:AddItem(3,"Third item") oEditor:DropDownRows := 1 oEditor:PopupAppearance := 1/*FlatApp*/ oItems := oGrid:Items() oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
494 |
How can I change the border for a drop down editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oEditor := oGrid:Columns():Add("Date"):Editor() oEditor:EditType := 7/*DateType*/ oEditor:PopupAppearance := 1/*FlatApp*/ oGrid:Items():AddItem("Today") oItems := oGrid:Items() oItems:CellEditor(oItems:AddItem("Today"),0):EditType := 7/*DateType*/ oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
493 |
How can I remove a predefined item in a drop down editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Color"):Editor() var_Editor:EditType := 17/*ColorListType*/ var_Editor:SetProperty("Option",4/*exColorListShowName*/,.T.) var_Editor:RemoveItem(255) oGrid:Items():AddItem(255) oGrid:Items():AddItem(65280) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
492 |
How can I remove or clear all predefined items in a drop down editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Color"):Editor() var_Editor:EditType := 17/*ColorListType*/ var_Editor:ClearItems() var_Editor:AddItem(255,"Red Color") oGrid:Items():AddItem(255) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
491 |
How can I center the predefined items in a drop down editor editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oEditor := oGrid:Columns():Add("DropDown"):Editor() oEditor:EditType := 3/*DropDownListType*/ oEditor:AddItem(1,"First item") oEditor:AddItem(2,"Second item") oEditor:AddItem(3,"Third item") oEditor:DropDownAlignment := 1/*CenterAlignment*/ oItems := oGrid:Items() oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
490 |
How can I right align the items in a drop down editor editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oEditor := oGrid:Columns():Add("DropDown"):Editor() oEditor:EditType := 3/*DropDownListType*/ oEditor:AddItem(1,"First item") oEditor:AddItem(2,"Second item") oEditor:AddItem(3,"Third item") oEditor:DropDownAlignment := 2/*RightAlignment*/ oItems := oGrid:Items() oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
489 |
How can I specify the width of the drop down editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oEditor := oGrid:Columns():Add("DropDown"):Editor() oEditor:DropDownAutoWidth := 0/*exDropDownEditorWidth*/ oEditor:DropDownMinWidth := 385 oEditor:EditType := 17/*ColorListType*/ oItems := oGrid:Items() oItems:AddItem(255) oItems:AddItem(65280) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
488 |
How can hide the drop down button for an editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oEditor := oGrid:Columns():Add("DropDown"):Editor() oEditor:DropDownVisible := .F. oEditor:EditType := 17/*ColorListType*/ oItems := oGrid:Items() oItems:AddItem(255) oItems:AddItem(65280) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
487 |
How can assign a tooltip to a drop down list editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oEditor := oGrid:Columns():Add("DropDown"):Editor() oEditor:EditType := 3/*DropDownListType*/ oEditor:AddItem(1,"First item") oEditor:AddItem(2,"Second item") oEditor:AddItem(3,"Third item") oEditor:SetProperty("ItemToolTip",1,"This is a tooltip that shows when user hovers the <b>first</b> item") oEditor:SetProperty("ItemToolTip",2,"This is a tooltip that shows when user hovers the <b>second</b> item") oEditor:SetProperty("ItemToolTip",3,"This is a tooltip that shows when user hovers the <b>third</b> item") oItems := oGrid:Items() oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
486 |
How can I lock, disable make read only an editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oEditor := oGrid:Columns():Add("DropDown"):Editor() oEditor:Locked := .T. oEditor:EditType := 3/*DropDownListType*/ oEditor:AddItem(1,"First item") oEditor:AddItem(2,"Second item") oEditor:AddItem(3,"Third item") oItems := oGrid:Items() oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
485 |
How can I sort the items in a drop down list editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oEditor := oGrid:Columns():Add("DropDown"):Editor() oEditor:EditType := 3/*DropDownListType*/ oEditor:AddItem(1,"Second item") oEditor:AddItem(2,"First item") oEditor:AddItem(3,"Third item") oEditor:SortItems(.T.) oItems := oGrid:Items() oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
484 |
How can I expand an item in the tree or a hierarchy of a drop down editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oColumn LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") oColumn := oGrid:Columns():Add("DropDown") oColumn:SetProperty("Def",17/*exCellValueFormat*/,1) oEditor := oColumn:Editor() oEditor:EditType := 3/*DropDownListType*/ oEditor:DropDownAutoWidth := 0/*exDropDownEditorWidth*/ oEditor:AddItem(1,"<b>CObject</b> class",1) oEditor:InsertItem(2,"<b>CCmdTarget</b> class",2,1) oEditor:InsertItem(3,"<b>CWnd</b> class",3,2) oEditor:InsertItem(6,"<bgcolor=10A0E0><fgcolor=F0F0F0>S y n c</fgcolor>",1,1) oEditor:AddItem(4,"Exceptions",1) oEditor:InsertItem(7,"<b>System</b> Exceptions",2,4) oEditor:AddItem(5,"File Services",2) oEditor:SetProperty("ExpandItem",1,.T.) oItems := oGrid:Items() oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
483 |
How can I display a tree or a hierarchy in a drop down editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oColumn LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") oColumn := oGrid:Columns():Add("DropDown") oColumn:SetProperty("Def",17/*exCellValueFormat*/,1) oEditor := oColumn:Editor() oEditor:EditType := 3/*DropDownListType*/ oEditor:DropDownAutoWidth := 0/*exDropDownEditorWidth*/ oEditor:AddItem(1,"<b>CObject</b> class",1) oEditor:InsertItem(2,"<b>CCmdTarget</b> class",2,1) oEditor:InsertItem(3,"<b>CWnd</b> class",3,2) oEditor:InsertItem(6,"<bgcolor=10A0E0><fgcolor=F0F0F0>S y n c</fgcolor>",1,1) oEditor:AddItem(4,"Exceptions",1) oEditor:InsertItem(7,"<b>System</b> Exceptions",2,4) oEditor:AddItem(5,"File Services",2) oEditor:ExpandAll() oItems := oGrid:Items() oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
482 |
How can I look for items that includes the typed characters in a drop down list editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oEditor := oGrid:Columns():Add("DropDown"):Editor() oEditor:SetProperty("Option",39/*exAutoSearch*/,1) oEditor:EditType := 3/*DropDownListType*/ oEditor:AddItem(1,"First item") oEditor:AddItem(2,"Second item") oEditor:AddItem(3,"Third item") oItems := oGrid:Items() oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
481 |
How can I keep the selection background color while editor is visible
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oEditor := oGrid:Columns():Add("DropDown"):Editor() oEditor:SetProperty("Option",45/*exKeepSelBackColor*/,.T.) oEditor:EditType := 3/*DropDownListType*/ oEditor:AddItem(1,"First item") oEditor:AddItem(2,"Second item") oEditor:AddItem(3,"Third item") oItems := oGrid:Items() oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
480 |
How can I select from a drop down list the editor, when the user starts typing in the editor, while it is closed and focused
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") oEditor := oGrid:Columns():Add("DropDown"):Editor() oEditor:SetProperty("Option",37/*exAutoDropDownList*/,1) oEditor:EditType := 3/*DropDownListType*/ oEditor:AddItem(1,"First item",1) oEditor:AddItem(2,"Second item",3) oEditor:AddItem(3,"Third item",2) oItems := oGrid:Items() oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
479 |
How can I automatically drop down the list editor, when the user starts typing in the editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") oEditor := oGrid:Columns():Add("DropDown"):Editor() oEditor:SetProperty("Option",37/*exAutoDropDownList*/,-1) oEditor:EditType := 3/*DropDownListType*/ oEditor:AddItem(1,"First item",1) oEditor:AddItem(2,"Second item",3) oEditor:AddItem(3,"Third item",2) oItems := oGrid:Items() oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
478 |
How can I add a Font editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Font"):Editor():EditType := 10/*FontType*/ oGrid:Items():AddItem("Tahoma") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
477 |
How can I change the visual appearance for the buttons in the calculator editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Slider"):Editor() var_Editor:EditType := 21/*CalculatorType*/ var_Editor:SetProperty("Option",105/*exCalcPictureUp*/,oGrid:ExecuteTemplate("loadpicture(`c:\exontrol\images\colorize.gif`)")) var_Editor:SetProperty("Option",106/*exCalcPictureDown*/,oGrid:ExecuteTemplate("loadpicture(`c:\exontrol\images\auction.gif`)")) oGrid:Items():AddItem(10) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
476 |
How can I customize the caption of buttons in the calculator editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Slider"):Editor() var_Editor:EditType := 21/*CalculatorType*/ var_Editor:SetProperty("Option",104/*exCalcButtons*/,"0;1;2;3;4;5;6;7;8;9;<b>+</b>;<fgcolor=FF0000>=</fgcolor>") oGrid:Items():AddItem(10) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
475 |
How can I customize the caption of buttons in the calculator editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Slider"):Editor() var_Editor:EditType := 21/*CalculatorType*/ var_Editor:SetProperty("Option",104/*exCalcButtons*/,"0;1;2;3;4;5;6;7;8;9") oGrid:Items():AddItem(10) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
474 |
How can I specify the width and height of the buttons in the calculator editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Slider"):Editor() var_Editor:EditType := 21/*CalculatorType*/ var_Editor:SetProperty("Option",102/*exCalcButtonWidth*/,32) var_Editor:SetProperty("Option",103/*exCalcButtonHeight*/,32) oGrid:Items():AddItem(10) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
473 |
How can I change the "Cannot divide by zero" message that shows in the calculator editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Slider"):Editor() var_Editor:EditType := 21/*CalculatorType*/ var_Editor:SetProperty("Option",101/*exCalcCannotDivideByZero*/,"Divizion by zero") oGrid:Items():AddItem(10) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
472 |
How can I enable or disable executing operations while the calculator editor is focused and closed
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Slider"):Editor() var_Editor:EditType := 21/*CalculatorType*/ var_Editor:SetProperty("Option",100/*exCalcExecuteKeys*/,.F.) oGrid:Items():AddItem(10) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
471 |
How can I add a calculator editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Slider"):Editor():EditType := 21/*CalculatorType*/ oGrid:Items():AddItem(10) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
470 |
How can I edit a number between a range or interval
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Slider"):Editor() var_Editor:EditType := 20/*SliderType*/ var_Editor:Numeric := -1/*exInteger*/ var_Editor:SetProperty("Option",40/*exSpinStep*/,0) var_Editor:SetProperty("Option",41/*exSliderWidth*/,0) var_Editor:SetProperty("Option",43/*exSliderMin*/,5) var_Editor:SetProperty("Option",44/*exSliderMax*/,15) oGrid:Items():AddItem(10) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
469 |
How can I hide or show the spin in the slider or track bar editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Slider"):Editor() var_Editor:EditType := 20/*SliderType*/ var_Editor:SetProperty("Option",40/*exSpinStep*/,0) oGrid:Items():AddItem(10) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
468 |
How can I add a slider or track bar editor, with a fixed size
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Slider"):Editor() var_Editor:EditType := 20/*SliderType*/ var_Editor:SetProperty("Option",41/*exSliderWidth*/,64) oGrid:Items():AddItem(10) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
467 |
How can I add a slider or track bar editor, so it covers half of the cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Slider"):Editor() var_Editor:EditType := 20/*SliderType*/ var_Editor:SetProperty("Option",41/*exSliderWidth*/,-50) oGrid:Items():AddItem(10) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
466 |
How can I add a slider or track bar editor, so it covers the full cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Slider"):Editor() var_Editor:EditType := 20/*SliderType*/ var_Editor:SetProperty("Option",41/*exSliderWidth*/,-100) oGrid:Items():AddItem(10) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
465 |
How can I add a slider or track bar editor within a range or interval of numbers
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Spin from 5 to 15"):Editor() var_Editor:EditType := 20/*SliderType*/ var_Editor:Numeric := -1/*exInteger*/ var_Editor:SetProperty("Option",43/*exSliderMin*/,5) var_Editor:SetProperty("Option",44/*exSliderMax*/,15) oGrid:Items():AddItem(10) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
464 |
How can I add a slider or track bar editor within a range or interval of float numbers
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Spin from 5 to 15"):Editor() var_Editor:EditType := 20/*SliderType*/ var_Editor:Numeric := 1/*exFloat*/ var_Editor:SetProperty("Option",43/*exSliderMin*/,0) var_Editor:SetProperty("Option",44/*exSliderMax*/,1) var_Editor:SetProperty("Option",40/*exSpinStep*/,"0.01") var_Editor:SetProperty("Option",42/*exSliderStep*/,"0.01") oGrid:Items():AddItem("0.3") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
463 |
How can I add a spin editor within a range or interval of float numbers
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Spin from 5 to 15"):Editor() var_Editor:EditType := 20/*SliderType*/ var_Editor:Numeric := 1/*exFloat*/ var_Editor:SetProperty("Option",41/*exSliderWidth*/,0) var_Editor:SetProperty("Option",43/*exSliderMin*/,0) var_Editor:SetProperty("Option",44/*exSliderMax*/,1) var_Editor:SetProperty("Option",40/*exSpinStep*/,"0.01") oGrid:Items():AddItem("0.3") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
462 |
How can I add a spin editor within a range or interval of numbers
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Spin from 5 to 15"):Editor() var_Editor:EditType := 20/*SliderType*/ var_Editor:Numeric := -1/*exInteger*/ var_Editor:SetProperty("Option",41/*exSliderWidth*/,0) var_Editor:SetProperty("Option",43/*exSliderMin*/,5) var_Editor:SetProperty("Option",44/*exSliderMax*/,15) oGrid:Items():AddItem(10) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
461 |
How can I add a slider or track bar editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Slider"):Editor():EditType := 20/*SliderType*/ oGrid:Items():AddItem(10) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
460 |
I have check box column, but the check-boxes looks disabled. What can I do
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Check"):Editor() var_Editor:EditType := 19/*CheckValueType*/ var_Editor:SetProperty("Option",17/*exCheckValue2*/,1) oItems := oGrid:Items() oItems:AddItem(.F.) oItems:AddItem(.T.) oItems:AddItem(.F.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
459 |
How do I add check box column, so the cell value is changed as I click the cells
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oColumn LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:MarkSearchColumn := .F. oColumn := oGrid:Columns():Add("C") oColumn:Width := 18 oColumn:AllowSizing := .F. oEditor := oColumn:Editor() oEditor:EditType := 19/*CheckValueType*/ oEditor:SetProperty("Option",17/*exCheckValue2*/,1) oGrid:Columns():Add("Text") oItems := oGrid:Items() oItems:SetProperty("CellValue",oItems:AddItem(.F.),1,"Check 1") oItems:SetProperty("CellValue",oItems:AddItem(.T.),1,"Check 2") oItems:SetProperty("CellValue",oItems:AddItem(.F.),1,"Check 3") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
458 |
How do I add check box column, so the cell value is changed as I click the cells
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Check"):Editor():EditType := 19/*CheckValueType*/ oItems := oGrid:Items() oItems:AddItem(.F.) oItems:AddItem(.T.) oItems:AddItem(.F.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
457 |
How do I disable adding new lines using the ENTER key in a memo or a multiple lines edit control
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Edit"):Editor() var_Editor:EditType := 18/*MemoDropDownType*/ var_Editor:SetProperty("Option",9/*exMemoDropDownAcceptReturn*/,.F.) oItems := oGrid:Items() oItems:SetProperty("CellSingleLine",oItems:AddItem("This is a long text that should break the line, and get it displayed on multiple lines.This is a long text that should break the line, and get it displayed on multiple lines."),0,0/*exCaptionWordWrap*/) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
456 |
How do I add a vertical scroll bar for a memo or a multiple lines edit control
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Edit"):Editor() var_Editor:EditType := 18/*MemoDropDownType*/ var_Editor:SetProperty("Option",2/*exMemoVScrollBar*/,.T.) oItems := oGrid:Items() oItems:SetProperty("CellSingleLine",oItems:AddItem("This is a long text that should break the line, and get it displayed on multiple lines.This is a long text that should break the line, and get it displayed on multiple lines."),0,0/*exCaptionWordWrap*/) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
455 |
How do I add a horizontal scroll bar for a memo or a multiple lines edit control
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Edit"):Editor() var_Editor:EditType := 18/*MemoDropDownType*/ var_Editor:SetProperty("Option",1/*exMemoHScrollBar*/,.T.) oItems := oGrid:Items() oItems:SetProperty("CellSingleLine",oItems:AddItem("This is a long text that should break the line, and get it displayed on multiple lines.This is a long text that should break the line, and get it displayed on multiple lines."),0,0/*exCaptionWordWrap*/) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
454 |
How can I specify the width or the height for a drop down memo or a multiple lines edit control
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Edit"):Editor() var_Editor:EditType := 18/*MemoDropDownType*/ var_Editor:SetProperty("Option",7/*exMemoDropDownWidth*/,256) var_Editor:SetProperty("Option",8/*exMemoDropDownHeight*/,64) oItems := oGrid:Items() oItems:SetProperty("CellSingleLine",oItems:AddItem("This is a long text that should break the line, and get it displayed on multiple lines."),0,0/*exCaptionWordWrap*/) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
453 |
How do I add a drop down memo or a multiple lines edit control
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Edit"):Editor():EditType := 18/*MemoDropDownType*/ oItems := oGrid:Items() oItems:SetProperty("CellSingleLine",oItems:AddItem("This is a long text that should break the line, and get it displayed on multiple lines."),0,0/*exCaptionWordWrap*/) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
452 |
How do I add a color list editor with my own or custom colors
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Color"):Editor() var_Editor:EditType := 17/*ColorListType*/ var_Editor:SetProperty("Option",4/*exColorListShowName*/,.T.) var_Editor:ClearItems() var_Editor:AddItem(255,"Red Color") var_Editor:AddItem(16711680,"Blue Color") var_Editor:AddItem(65280,"Green Color") oGrid:Items():AddItem(255) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
451 |
How do I add a color list editor with my own or custom colors
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Color"):Editor() var_Editor:EditType := 17/*ColorListType*/ var_Editor:ClearItems() var_Editor:AddItem(255,"Red Color") var_Editor:AddItem(16711680,"Blue Color") var_Editor:AddItem(65280,"Green Color") oGrid:Items():AddItem(255) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
450 |
How can I show the color's name in a color list editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Color"):Editor() var_Editor:EditType := 17/*ColorListType*/ var_Editor:SetProperty("Option",4/*exColorListShowName*/,.T.) oGrid:Items():AddItem(255) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
449 |
How do I add a color list editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Color"):Editor():EditType := 17/*ColorListType*/ oGrid:Items():AddItem(255) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
448 |
How can I access my own custom or ActiveX editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oCalendar LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:DrawGridLines := -1/*exAllLines*/ oGrid:DefaultItemHeight := 128 oEditor := oGrid:Columns():Add("DropDown"):Editor() oEditor:EditType := 16/*UserEditorType*/ oEditor:UserEditor("MSCAL.Calendar","") oCalendar := oEditor:UserEditorObject() oCalendar:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. )) oCalendar:GridCellEffect := 0 oCalendar:ShowTitle := .F. oCalendar:ShowDateSelectors := .F. oItems := oGrid:Items() oItems:AddItem("MSCal.Calendar") oItems:AddItem("MSCal.Calendar") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
447 |
How can I add my own custom or ActiveX editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:DrawGridLines := -1/*exAllLines*/ oGrid:DefaultItemHeight := 128 oEditor := oGrid:Columns():Add("DropDown"):Editor() oEditor:EditType := 16/*UserEditorType*/ oEditor:UserEditor("MSCAL.Calendar","") oItems := oGrid:Items() oItems:AddItem("MSCal.Calendar") oItems:AddItem("MSCal.Calendar") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
446 |
How can I add a hyperlink editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Shell.Execute"):Editor():EditType := 15/*LinkEditType*/ oGrid:Items():AddItem("http://www.exontrol.com") oGrid:Items():AddItem("c:\") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
445 |
How can I add a drop down editor, that allows only predefined values, but still being able to edit and select
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") oEditor := oGrid:Columns():Add("DropDown"):Editor() oEditor:EditType := 14/*PickEditType*/ oEditor:AddItem(1,"The first item",1) oEditor:AddItem(2,"The second item",3) oEditor:AddItem(3,"The third item",2) oItems := oGrid:Items() oItems:AddItem("The first item") oItems:AddItem("The third item") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
444 |
How can I show or hide the rectangle arround progress bar editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,0 } ) , .F. )) oGrid:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 128,255,255 } ) , .F. )) var_Editor := oGrid:Columns:Add("Progress"):Editor() var_Editor:EditType := 13/*ProgressBarType*/ var_Editor:SetProperty("Option",13/*exProgressBarMarkTicker*/,.F.) oGrid:Items():AddItem(33) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
443 |
How can I hide the caption / percent in the progress bar editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,0 } ) , .F. )) oGrid:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 128,255,255 } ) , .F. )) var_Editor := oGrid:Columns:Add("Progress"):Editor() var_Editor:EditType := 13/*ProgressBarType*/ var_Editor:SetProperty("Option",12/*exProgressBarAlignment*/,-1) oGrid:Items():AddItem(33) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
442 |
How can I align the caption in the center of the progress bar editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,0 } ) , .F. )) oGrid:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 128,255,255 } ) , .F. )) var_Editor := oGrid:Columns:Add("Progress"):Editor() var_Editor:EditType := 13/*ProgressBarType*/ var_Editor:SetProperty("Option",12/*exProgressBarAlignment*/,1) oGrid:Items():AddItem(33) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
441 |
How can I align the caption to the right in the progress bar editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,0 } ) , .F. )) oGrid:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 128,255,255 } ) , .F. )) var_Editor := oGrid:Columns:Add("Progress"):Editor() var_Editor:EditType := 13/*ProgressBarType*/ var_Editor:SetProperty("Option",12/*exProgressBarAlignment*/,2) oGrid:Items():AddItem(33) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
440 |
How can I change the background color for a progress bar editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,0 } ) , .F. )) oGrid:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 128,255,255 } ) , .F. )) var_Editor := oGrid:Columns:Add("Progress"):Editor() var_Editor:EditType := 13/*ProgressBarType*/ var_Editor:SetProperty("Option",11/*exProgressBarBackColor*/,255) oGrid:Items():AddItem(33) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
439 |
How can I add a progress bar editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,0 } ) , .F. )) oGrid:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 128,255,255 } ) , .F. )) oGrid:Columns():Add("Progress"):Editor():EditType := 13/*ProgressBarType*/ oGrid:Items():AddItem(33) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
438 |
How can I add a button editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Button"):Editor():EditType := 12/*ButtonType*/ oGrid:Items():AddItem("Just a text") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
437 |
How can I show or hide the type of the OLE Object for Photo or a Picture editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oColumn LOCAL oEditor LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:ColumnAutoResize := .F. oColumn := oGrid:Columns():Add("Photo") oColumn:Width := 74 oEditor := oColumn:Editor() oEditor:EditType := 11/*PictureType*/ oEditor:SetProperty("Option",52/*exShowPictureType*/,.F.) oItems := oGrid:Items() h := oItems:AddItem() oItems:SetProperty("CellValue",h,0,oGrid:ExecuteTemplate("loadpicture(`c:\exontrol\images\sample.bmp`)")) oItems:SetProperty("ItemHeight",h,64) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
436 |
How can I add a Photo or a Picture editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Photo"):Editor():EditType := 11/*PictureType*/ oItems := oGrid:Items() h := oItems:AddItem() oItems:SetProperty("CellValue",h,0,oGrid:ExecuteTemplate("loadpicture(`c:\exontrol\images\sample.bmp`)")) oItems:SetProperty("ItemHeight",h,64) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
435 |
How can I hide or show the "System" page in the color editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Color"):Editor() var_Editor:EditType := 9/*ColorType*/ var_Editor:SetProperty("Option",6/*exColorShowSystem*/,.F.) oGrid:Items():AddItem(255) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
434 |
How can I hide or show the "Palette" page in the color editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Color"):Editor() var_Editor:EditType := 9/*ColorType*/ var_Editor:SetProperty("Option",5/*exColorShowPalette*/,.F.) oGrid:Items():AddItem(255) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
433 |
How do I add a color editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Color"):Editor():EditType := 9/*ColorType*/ oGrid:Items():AddItem(255) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
432 |
How do I change the masking character
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Mask"):Editor() var_Editor:EditType := 8/*MaskType*/ var_Editor:Mask := "###" var_Editor:MaskChar := 48 oGrid:Items():AddItem("") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
431 |
How do I mask an IP
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("IP"):Editor() var_Editor:EditType := 8/*MaskType*/ var_Editor:Mask := "{0,255}\.{0,255}\.{0,255}\.{0,255}" oGrid:Items():AddItem("1.2.3.4") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
430 |
How do I add a mask editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Mask"):Editor() var_Editor:EditType := 8/*MaskType*/ var_Editor:Mask := "{0,255}\.{0,255}\.{0,255}\.{0,255}" oGrid:Items():AddItem("1.2.3.4") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
429 |
How to show or hide the week numbers header in a drop down date picker calendar editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Date"):Editor() var_Editor:EditType := 7/*DateType*/ var_Editor:SetProperty("Option",47/*exDateWeeksHeader*/,.T.) oGrid:Items():AddItem("Today") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
428 |
How do I show or hide the bottom scroll bar in the drop down date picker calendar editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Date"):Editor() var_Editor:EditType := 7/*DateType*/ var_Editor:SetProperty("Option",35/*exDateShowScroll*/,.F.) oGrid:Items():AddItem("Today") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
427 |
How do highlight the "Today" date is the drop down date picker calendar editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Date"):Editor() var_Editor:EditType := 7/*DateType*/ var_Editor:SetProperty("Option",34/*exDateMarkToday*/,.T.) oGrid:Items():AddItem("Today") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
426 |
How do I show or hide the "Today" button is the drop down date picker calendar editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Date"):Editor() var_Editor:EditType := 7/*DateType*/ var_Editor:SetProperty("Option",33/*exDateShowTodayButton*/,.F.) oGrid:Items():AddItem("Today") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
425 |
How to specify the first day of the week in the drop down date picker calendar editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Date"):Editor() var_Editor:EditType := 7/*DateType*/ var_Editor:SetProperty("Option",32/*exDateFirstWeekDay*/,1) oGrid:Items():AddItem("Today") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
424 |
How to specifies the shortcut for the weekdays to be displayed in the drop down date picker calendar editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Date"):Editor() var_Editor:EditType := 7/*DateType*/ var_Editor:SetProperty("Option",31/*exDateWeekDays*/,"Du Lu Ma Mi Jo Vi Si") oGrid:Items():AddItem("Today") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
423 |
How can I change the name of the months in the drop down date picker calendar editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Date"):Editor() var_Editor:EditType := 7/*DateType*/ var_Editor:SetProperty("Option",30/*exDateMonths*/,"Janvier Février Mars Avril Mai Juin Juillet Août Septembre Octobre Novembre Décembre") oGrid:Items():AddItem("Today") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
422 |
Can I change the "Today" caption being displayed in the drop down date picker calendar editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Date"):Editor() var_Editor:EditType := 7/*DateType*/ var_Editor:SetProperty("Option",29/*exDateTodayCaption*/,"Azi") oGrid:Items():AddItem("Today") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
421 |
How can allow empty date to drop down date picker control or a calendar control
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Date"):Editor() var_Editor:EditType := 7/*DateType*/ var_Editor:SetProperty("Option",14/*exDateAllowNullDate*/,.T.) oItems := oGrid:Items() oItems:AddItem("Today") oItems:AddItem("") oItems:AddItem("Today") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
420 |
How can I a drop down date picker control or a calendar control
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Date"):Editor():EditType := 7/*DateType*/ oItems := oGrid:Items() oItems:AddItem("Today") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
419 |
How can I have an OR combination of my bit values, something like a check-box list editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oColumn LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oColumn := oGrid:Columns():Add("CkeckList") oColumn:SetProperty("Def",17/*exCellValueFormat*/,1) oEditor := oColumn:Editor() oEditor:EditType := 6/*CheckListType*/ oEditor:AddItem(1,"Bit <b>1</b>") oEditor:AddItem(2,"Bit <b>2</b>") oEditor:AddItem(4,"Bit <b>3</b>") oEditor:AddItem(8,"Bit <b>4</b>") oEditor:AddItem(16,"Bit <b>5</b>") oEditor:AddItem(32,"Bit <b>6</b>") oEditor:AddItem(64,"Bit <b>7</b>") oEditor:AddItem(128,"Bit <b>8</b>") oItems := oGrid:Items() oItems:AddItem(112) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
418 |
How do I stop resizing the memo or a multiple lines edit control, while the user types
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Edit"):Editor() var_Editor:EditType := 5/*MemoType*/ var_Editor:SetProperty("Option",3/*exMemoAutoSize*/,.F.) var_Editor:SetProperty("Option",1/*exMemoHScrollBar*/,.T.) var_Editor:SetProperty("Option",2/*exMemoVScrollBar*/,.T.) oItems := oGrid:Items() oItems:SetProperty("CellSingleLine",oItems:AddItem("This is a long text that should break the line, and get it displayed on multiple lines.This is a long text that should break the line, and get it displayed on multiple lines."),0,0/*exCaptionWordWrap*/) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
417 |
How do I add a horizontal scroll bar for a memo or a multiple lines edit control
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Edit"):Editor() var_Editor:EditType := 5/*MemoType*/ var_Editor:SetProperty("Option",1/*exMemoHScrollBar*/,.T.) oItems := oGrid:Items() oItems:SetProperty("CellSingleLine",oItems:AddItem("This is a long text that should break the line, and get it displayed on multiple lines.This is a long text that should break the line, and get it displayed on multiple lines."),0,0/*exCaptionWordWrap*/) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
416 |
How do I add a vertical scroll bar for a memo or a multiple lines edit control
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Edit"):Editor() var_Editor:EditType := 5/*MemoType*/ var_Editor:SetProperty("Option",2/*exMemoVScrollBar*/,.T.) oItems := oGrid:Items() oItems:SetProperty("CellSingleLine",oItems:AddItem("This is a long text that should break the line, and get it displayed on multiple lines.This is a long text that should break the line, and get it displayed on multiple lines."),0,0/*exCaptionWordWrap*/) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
415 |
How do I add a memo or a multiple lines edit control
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Edit"):Editor():EditType := 5/*MemoType*/ oItems := oGrid:Items() oItems:SetProperty("CellSingleLine",oItems:AddItem("This is a long text that should break the line, and get it displayed on multiple lines."),0,0/*exCaptionWordWrap*/) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
414 |
How to specify the proposed change when the user clicks a spin control.
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Edit"):Editor() var_Editor:EditType := 4/*SpinType*/ var_Editor:Numeric := -1/*exInteger*/ var_Editor:SetProperty("Option",40/*exSpinStep*/,10) oItems := oGrid:Items() oItems:AddItem(0) oItems:AddItem(10) oItems:AddItem(20) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
413 |
How do I add a spin editor that allows only integer values
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Edit"):Editor() var_Editor:EditType := 4/*SpinType*/ var_Editor:Numeric := -1/*exInteger*/ oItems := oGrid:Items() oItems:AddItem(0) oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
412 |
How do I add a spin editor
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Columns():Add("Edit"):Editor():EditType := 4/*SpinType*/ oItems := oGrid:Items() oItems:AddItem(0) oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
411 |
How do I specify in a drop down list editor, that I do not want to have predefined icon
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") oEditor := oGrid:Columns():Add("DropDown"):Editor() oEditor:EditType := 3/*DropDownListType*/ oEditor:AddItem(1,"The first item",1) oEditor:AddItem(2,"The second item",3) oEditor:AddItem(3,"The third item",2) oEditor:SetProperty("Option",28/*exDropDownImage*/,.F.) oItems := oGrid:Items() oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
410 |
How do I add a drop down editor, that allows only predefined values
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") oEditor := oGrid:Columns():Add("DropDown"):Editor() oEditor:EditType := 3/*DropDownListType*/ oEditor:AddItem(1,"The first item",1) oEditor:AddItem(2,"The second item",3) oEditor:AddItem(3,"The third item",2) oItems := oGrid:Items() oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
409 |
How to allow the editor to work on insert or overtype mode
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Edit"):Editor() var_Editor:EditType := 1/*EditType*/ var_Editor:SetProperty("Option",200/*exEditAllowOverType*/,.T.) var_Editor:SetProperty("Option",201/*exEditOverType*/,.T.) oItems := oGrid:Items() oItems:AddItem("000") oItems:AddItem("111") oItems:AddItem("222") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
408 |
How to set foreground color for a locked, or read only edit control
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Edit"):Editor() var_Editor:EditType := 1/*EditType*/ var_Editor:Locked := .T. var_Editor:SetProperty("Option",51/*exEditLockedForeColor*/,8421504) oItems := oGrid:Items() oItems:AddItem("000") oItems:AddItem("111") oItems:AddItem("222") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
407 |
How to set background color for a locked, or read only edit control
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Edit"):Editor() var_Editor:EditType := 1/*EditType*/ var_Editor:Locked := .T. var_Editor:SetProperty("Option",50/*exEditLockedBackColor*/,8421504) oItems := oGrid:Items() oItems:AddItem("000") oItems:AddItem("111") oItems:AddItem("222") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
406 |
How to set the number of characters selected, when an EditType editor is opened
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Edit"):Editor() var_Editor:EditType := 1/*EditType*/ var_Editor:SetProperty("Option",49/*exEditSelLength*/,1) oItems := oGrid:Items() oItems:AddItem("000") oItems:AddItem("111") oItems:AddItem("222") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
405 |
How to set the starting point of text selected, when an EditType editor is opened
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Edit"):Editor() var_Editor:EditType := 1/*EditType*/ var_Editor:SetProperty("Option",48/*exEditSelStart*/,1) var_Editor:SetProperty("Option",49/*exEditSelLength*/,1) oItems := oGrid:Items() oItems:AddItem("000") oItems:AddItem("111") oItems:AddItem("222") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
404 |
How to specifiy the symbol that indicates the decimal values while editing a floating point number
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL oColumn LOCAL oEditor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) oGrid:BeginUpdate() oColumn := oGrid:Columns():Add("Float") oColumn:FormatColumn := "len(value) ? (round(value) = value ? value : value format `|,|0`) : ``" oEditor := oColumn:Editor() oEditor:EditType := 1/*EditType*/ oEditor:Numeric := 2/*exFloatInteger*/ oEditor:SetProperty("Option",46/*exEditDecimalSymbol*/,44) oItems := oGrid:Items() oItems:AddItem(0.12) oItems:AddItem(1) oItems:AddItem(2.45) oGrid:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
403 |
How can I edit a float number
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Edit"):Editor() var_Editor:EditType := 1/*EditType*/ var_Editor:Numeric := 1/*exFloat*/ oItems := oGrid:Items() oItems:AddItem(0) oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
402 |
How can I edit a number
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Edit"):Editor() var_Editor:EditType := 1/*EditType*/ var_Editor:Numeric := -1/*exInteger*/ oItems := oGrid:Items() oItems:AddItem(0) oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
401 |
How do I limit the length of the text that the user may enter into an edit control
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGrid LOCAL var_Editor LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oGrid := XbpActiveXControl():new( oForm:drawingArea ) oGrid:CLSID := "Exontrol.Grid.1" /*{101EE60F-7B07-48B0-A13A-F32BAE7DA165}*/ oGrid:create(,, {10,60},{610,370} ) var_Editor := oGrid:Columns:Add("Edit"):Editor() var_Editor:EditType := 1/*EditType*/ var_Editor:SetProperty("Option",36/*exEditLimitText*/,1) oItems := oGrid:Items() oItems:AddItem(0) oItems:AddItem(1) oItems:AddItem(2) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |